home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0"?>
-
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:fd="http://www.bradsoft.com/feeddemon/xmlns/1.0/">
-
- <xsl:output method="html"
- doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
- doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
-
- $INCLUDE(commonvar.inc)$
-
- <fd:capabilities showExcerpts="true" toggleExcerpts="true" collapsePosts="false" itemGrouping="false" showBreadcrumbs="true" />
-
- <xsl:key name="key-group" match="/newspaper/channel/item" use="groupId" />
- <xsl:variable name="feed-type" select="newspaper/channel/@feedType"/>
-
- <xsl:template match="newspaper">
- <html>
- <head>
- <title>Newspaper (<xsl:value-of select="title" disable-output-escaping="yes"/>)</title>
- $INCLUDE(metatrans.inc)$
- <style type="text/css">
- $INCLUDE(commonstyles.css)$
-
- body {
- font: $FONT-SIZE-NEWSPAPER$/1.5em "$FONT-NAME-NEWSPAPER$", Verdana, Arial, sans-serif;
- padding-bottom: 18px;
- color: black;
- margin: 0;
- background-repeat: repeat;
- background-image: url("$IMAGEDIR$blue_bg.gif");
- background-color: #324671;
- /*background-image: url("$IMAGEDIR$bluevista_bg.jpg");
- background-color: #85B2ED;*/
- }
- #container {
- margin: 25px;
- padding: 20px 38px;
- background-color: white;
- border: 1px solid #1B60B9;
- border-right-width: 2px;
- border-bottom-width: 2px;
- }
-
- div#sidebar {
- float: left;
- margin-left: -14px;
- margin-right: 16px;
- margin-top: -18px;
- margin-bottom: 0;
- width: 45%;
- background-color: #E5F1FF;
- border: 1px dotted #85B2ED;
- border-bottom: none;
- }
- div#sidebar div.fdnewsitem { padding: 18px 20px; margin: 0; }
-
- a { color: #526FB2; }
- div.newsitemcontent a:visited { color: gray; }
- a:hover { color: #3C5386; text-decoration: underline; }
- a.notcached {
- text-decoration: none ! important;
- border-bottom: 1px dotted red ! important;
- }
-
- h1,h2,h3,h4,h5,h6 { font-size: 100%; font-weight: bold; font-style: italic; }
-
- div#newspapertitle {
- font-size: 20px;
- font-weight: bold;
- margin-top: 26px;
- margin-bottom: 30px;
- color: #324671;
- letter-spacing: 1px;
- }
- #newspapertitle img { margin-right: 6px; border: 0; }
- div#newspapertitle a { text-decoration: none; }
- div#newspapertitle a:hover { text-decoration: underline; }
-
- div#pageheader { width: 100%; margin-bottom: 10px; }
- div#breadcrumbs { overflow: hidden; float: left; }
-
- div.fdnewsitem {
- margin-bottom: 18px;
- padding: 2px 4px;
- border-bottom: 1px dotted #85B2ED;
- }
- div.newsitemtitle {
- font-size: 106%;
- margin-bottom: 4px;
- <xsl:if test="$newspaper-type='newsitem'">
- margin-top: 30px;
- </xsl:if>
- }
- div.newsitemtitle a { text-decoration: none;}
- div.newsitemtitle a:hover { text-decoration: underline; }
- div.newsitemtitle img, div.newsitemheader img { border: none; }
- div.newsitemheader img { margin: 0 1px; }
-
- div.postenclosure {
- margin-top: 4px;
- margin-bottom: 10px;
- font-size: smaller;
- }
- .postenclosurename { font-weight: bold; }
-
- img.imgread { margin-right: 4px; }
- img.imgopennew { margin-left: 4px; }
-
- div.newsitemcontent {
- padding-bottom: 18px;
- overflow-x: hidden; /* cut off images that are too wide */
- }
- div.newsitemcontent img { border: none; margin: 2px 3px; }
- div.postactions { display: inline; }
- div.newsitemheader { font-size: x-small; margin: 8px 0; color: #9B9B9B; }
- div#noitems {
- color: #9099AE;
- margin-bottom: 12px;
- padding-bottom: 12px;
- }
-
- span.sep { color: #ACA899; margin: 0 3px; }
-
- #pageheader { color: #9099AE; }
-
- .unread a { font-weight: bold; color: $COLOR-UNREAD$; }
- .flagged a { color: $COLOR-FLAGGED$; }
- .normal a { color: black; }
-
- a.more { font-weight: bold; padding-left: 4px; text-decoration: none }
-
- a img.button { padding: 1px; }
- a:hover img.button { border: 1px solid #A0B8D8; background-color: #D9E6F7; padding: 0; }
- img.icon { border: none; }
-
- #thumbnails {
- color: #324671;
- font-weight: bold;
- margin-bottom: 30px;
- }
- #thumbnails_group {
- text-align: center;
- margin-top: 6px;
- padding: 8px;
- border: 1px dotted #324671;
- /*background-image: url("$IMAGEDIR$blue_bg.gif");
- background-repeat: repeat-x;*/
- background-color: #324671;
- zoom: 100%; /* force filter */
- filter: progid:DXImageTransform.Microsoft.Gradient(gradientType=0,startColorStr=#324671,endColorStr=#92A5CF);
- }
- #thumbnails .collapsed { display: none; }
- img.thumbnail {
- display: inline;
- margin: 2px;
- border: 2px solid #DCE2EF;
- filter:progid:DXImageTransform.Microsoft.DropShadow(color=#324671, offX=3, offY=3);
- vertical-align: middle;
- }
- a:hover img.thumbnail { border-color: #FFA4A4; }
-
- .hidden { display: none; }
-
- img.fdpostimg {
- float: right;
- height: 64px;
- max-width: 80px; /* IE7 */
- margin-left: 10px;
- }
- a img.fdpostimg { border: 1px solid white; }
- a:hover img.fdpostimg { border-color: #A0B8D8; }
-
- #fdfocusedpost { background-color: #FFFFD2; }}
-
- </style>
- </head>
- <body>
- <xsl:variable name="folderId" select="@folderId"/>
-
- <div id="container">
- <div id="pageheader">
- <!-- breadcrumbs -->
- <xsl:if test="breadCrumbs">
- <div id="breadcrumbs">
- <xsl:variable name="num-breadcrumbs" select="count(breadCrumbs/breadCrumb)"/>
- <xsl:for-each select="breadCrumbs/breadCrumb">
- <xsl:choose>
- <xsl:when test="position()=last() and $num-breadcrumbs>1">
- <xsl:value-of select="@title"/>
- </xsl:when>
- <xsl:otherwise>
- <a href="{.}"><xsl:value-of select="@title"/></a>
- <xsl:if test="$num-breadcrumbs>1"> \ </xsl:if>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
- </div>
- </xsl:if>
- </div>
-
- <xsl:if test="title and $newspaper-type!='newsitem'">
- <div id="newspapertitle">
- <!-- $.INCLUDE(headerimg.inc)$ -->
- <xsl:choose>
- <xsl:when test="(@feedId!='') and ($newspaper-type='channel') and (channel/link)">
- <a href="fdaction:?action=gotofeedlink&feedId={@feedId}">
- <xsl:value-of select="title" disable-output-escaping="yes"/>
- </a>
- <a href="fdaction:?action=gotofeedlink&newtab=1&feedId={@feedId}" title="$LANG_CONST(S_NewsHintOpenInNewTab)$">
- <img class="imgopennew button" src="$IMAGEDIR$linknew.gif" align="top" />
- </a>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="title" disable-output-escaping="yes"/>
- </xsl:otherwise>
- </xsl:choose>
- </div>
- </xsl:if>
-
- <!-- thumbnails -->
- <xsl:variable name="nds_thumbnails" select="channel/item/thumbnail"/>
- <xsl:if test="$nds_thumbnails">
- <div id="thumbnails">
- $LANG_CONST(S_NewsLblThumbnails)$
- <a href="fdaction:?action=togglecollapse&id=thumbnails">
- <img src="$IMAGEDIR$arrowdown.gif" class="button" id="thumbnails_img_expand" border="0" align="absmiddle" />
- </a>
- <div id="thumbnails_group">
- <xsl:for-each select="$nds_thumbnails">
- <xsl:variable name="thumbnail-url" select="@url"/>
- <xsl:variable name="thumbnail-title" select="../title"/>
- <xsl:variable name="thumbnail-link">fdaction:?action=gotopostlink&feedid=<xsl:value-of select="../@feedId"/>&postid=<xsl:value-of select="../@postId"/>&markpostread=1</xsl:variable>
- <xsl:variable name="thumbnail-height" select="@height"/>
- <xsl:variable name="thumbnail-width" select="@width"/>
- <a href="{$thumbnail-link}" title="{$thumbnail-title}">
- <xsl:choose>
- <xsl:when test="$thumbnail-height=0 or $thumbnail-width=0">
- <img src="{$thumbnail-url}" class="thumbnail"/>
- </xsl:when>
- <xsl:otherwise>
- <img src="{$thumbnail-url}" class="thumbnail" height="{$thumbnail-height}" width="{$thumbnail-width}" />
- </xsl:otherwise>
- </xsl:choose>
- </a>
- </xsl:for-each>
- </div>
- </div>
- </xsl:if>
-
- <xsl:choose>
- <xsl:when test="$item-count=0">
- <div id="noitems">$LANG_CONST(S_NoItemsInNewspaperFilter)$</div>
- </xsl:when>
- <!-- show some items in a sidebar div when enough exist (first page only) -->
- <xsl:when test="$item-count>3 and pageInfo/@pageNum <=1">
- <xsl:variable name="nds_items" select="channel/item"/>
- <xsl:variable name="sidebar-cnt" select="$item-count div 3"/>
- <div id="sidebar">
- <xsl:for-each select="$nds_items">
- <xsl:sort select="@sortIndex" data-type="number"/>
- <xsl:if test="@sortIndex<=$sidebar-cnt">
- <xsl:apply-templates select="."/>
- </xsl:if>
- </xsl:for-each>
- </div>
- <xsl:for-each select="$nds_items">
- <xsl:sort select="@sortIndex" data-type="number"/>
- <xsl:if test="@sortIndex>$sidebar-cnt">
- <xsl:apply-templates select="."/>
- </xsl:if>
- </xsl:for-each>
- </xsl:when>
- <!-- show all items in same div -->
- <xsl:otherwise>
- <xsl:for-each select="channel/item">
- <xsl:sort select="@sortIndex" data-type="number"/>
- <xsl:apply-templates select="."/>
- </xsl:for-each>
- </xsl:otherwise>
- </xsl:choose>
- </div>
- </body>
- </html>
- </xsl:template>
-
- <!-- news item template -->
- <xsl:template match="item">
- <xsl:variable name="feedId" select="@feedId"/>
- <xsl:variable name="postId" select="@postId"/>
- <xsl:variable name="itemlink" select="link"/>
-
- <xsl:variable name="itemclass">
- <xsl:choose>
- <xsl:when test="state/@read=0 and state/@flagged!=0">unread flagged</xsl:when>
- <xsl:when test="state/@read=0">unread</xsl:when>
- <xsl:when test="state/@flagged!=0">flagged</xsl:when>
- <xsl:otherwise>normal</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <xsl:variable name="show-this-excerpt" select="excerpt and $item-count>1"/>
- <!-- must wrap in container so entire post can be hidden if deleted by user -->
- <div id="{$postId}_container">
- <div class="fdnewsitem" name="{$feedId}:{$postId}">
- <div class="newsitemtitle {$itemclass}" id="{$postId}_title" >
- <a title="$LANG_CONST(S_NewsHintGotoPost)$" href="fdaction:?action=gotopostlink&feedid={$feedId}&postid={$postId}&markpostread=1">
- <xsl:value-of select="title" disable-output-escaping="yes"/>
- </a>
- <!-- goto post link in new tab -->
- <a href="fdaction:?action=gotopostlink&newtab=1&feedid={$feedId}&postid={$postId}&markpostread=1" title="$LANG_CONST(S_NewsHintOpenInNewTab)$">
- <img class="imgopennew button" src="$IMAGEDIR$linknew.gif" align="absmiddle" />
- </a>
- </div>
- <!-- display image for this post when excerpts are being shown -->
- <xsl:if test="postImageUrl and $show-this-excerpt">
- <a id="{$postId}_fdpostimg" href="{postImageUrl}" title="{postImageUrl}">
- <img class="fdpostimg" src="{postImageUrl}"/>
- </a>
- </xsl:if>
- <div class="newsitemheader">
- $INCLUDE(postactions.inc)$
- <span class="sep">|</span><xsl:value-of select="dateDisplay"/>
- <xsl:if test="author"><span class="sep">|</span> <xsl:value-of select="author" disable-output-escaping="yes"/></xsl:if>
- <!-- source -->
- <xsl:if test="source and source/@htmlUrl">
- <xsl:variable name="srclink" select="source/@htmlUrl"/>
- <span class="sep">|</span> <a href="{$srclink}"><xsl:value-of select="source"/></a>
- </xsl:if>
- </div>
- $INCLUDE(postenclosure.inc)$
- <xsl:if test="description">
- <div class="newsitemcontent">
- <xsl:choose>
- <xsl:when test="$show-this-excerpt">
- <a href="fdaction:?action=toggleexcerpt&postid={$postId}&feedid={$feedId}">
- <img class="toggle" align="top" id="{$postId}_img_toggle_excerpt" src="$IMAGEDIR$plus.gif"/>
- </a>
- <!-- note that the full description is inserted dynamically by FeedDemon when the excerpt is expanded -->
- <span id="{$postId}_description" class="collapsed">
- <xsl:value-of select="excerpt" disable-output-escaping="yes"/>
- </span>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="description" disable-output-escaping="yes"/>
- </xsl:otherwise>
- </xsl:choose>
- </div>
- </xsl:if>
- </div>
- </div>
- </xsl:template>
-
- </xsl:stylesheet>